package mest.service.hws.impl;

import com.alibaba.fastjson.JSON;
import mest.dao.hws.warehouse_productjob_purchaseMapper;
import mest.service.hws.warehouse_productjob_purchaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/*
* 数据流采购单内容
* */
@Service
public class warehouse_productjob_purchaseServiceImpl implements warehouse_productjob_purchaseService {
    @Resource
    private mest.dao.hws.warehouse_productjob_purchaseMapper warehouse_productjob_purchaseMapper;

    @Override
    public String insert(String theirDb,
                         List<Map<String, Object>> record) {
        /*/insertModel /delModel /updateByone*/
        System.out.println("进入增删改方法");
        Map<String, Object> map = new HashMap<String, Object>();
        try {
                map.put("code", 0);
                map.put("msg", "操作成功");
                map.put("count",warehouse_productjob_purchaseMapper.insert(theirDb,record));
        }catch (Exception e){
            map.put("code", 1);
            map.put("msg", "操作失败");
            e.toString();
        }    
        return JSON.toJSONString(map);
    }
}
